package com.qscloud.cust;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
@MapperScan(basePackages = {"com.qscloud.cust.dao","com.qscloud.cust.mapper"})

public class CustApplication {

    public static void main(String[] args) {
        SpringApplication.run(CustApplication.class, args);
    }

    @Value("${wahaha.name}")
    private String name;

    @RequestMapping("/")
    @RefreshScope
    public  String mm(){
        System.out.println("ceshi");
        System.out.println("chengg");
        System.out.println("123456");
        return "ok------"+this.name+"------------------------";
    }
}
